<template>
    <el-table
      :data="tableData"
      :default-sort="{ prop: 'date', order: 'descending' }"
      style="width: 100%" height="540"
      size="large"
    >
      <el-table-column flxed prop="date" label="时间" sortable width="400" />
      <el-table-column prop="option" label="操作" width="200" />
      <el-table-column prop="change" label="积分变动" width="200" />
    </el-table>
  </template>
  
  <script lang="ts" setup>
  import type { TableColumnCtx } from 'element-plus'
  
  interface User {
    date: string
    option: string
    change: string
  }
  
  
  const tableData: User[] = [
    {
      date: '2016-05-03',
      option: '用户注册',
      change: '+100积分',
    },
    {
      date: '2016-05-02',
      option: '每日登录',
      change: '+100积分',
    },
    {
      date: '2016-05-04',
      option: '每日登录',
      change: '+100积分',
    },
    {
      date: '2016-05-01',
      option: '每日登录',
      change: '+100积分',
    },
  ]
  </script>
  